3.3 \(\int (f+\frac {g}{x}) (A+B \log (e (\frac {a+b x}{c+d x})^n)) \, dx\)

Optimal. Leaf size=143 \[ g \log (x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )+\frac {B f (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b}-\frac {B f n (b c-a d) \log (c+d x)}{b d}-B g n \text {Li}_2\left (-\frac {b x}{a}\right )-B g n \log (x) \log \left (\frac {b x}{a}+1\right )+A f x+B g n \text {Li}_2\left (-\frac {d x}{c}\right )+B g n \log (x) \log \left (\frac {d x}{c}+1\right ) \]

[Out]

A*f*x-B*g*n*ln(x)*ln(1+b*x/a)+B*f*(b*x+a)*ln(e*((b*x+a)/(d*x+c))^n)/b+g*ln(x)*(A+B*ln(e*((b*x+a)/(d*x+c))^n))-
B*(-a*d+b*c)*f*n*ln(d*x+c)/b/d+B*g*n*ln(x)*ln(1+d*x/c)-B*g*n*polylog(2,-b*x/a)+B*g*n*polylog(2,-d*x/c)

________________________________________________________________________________________

Rubi [A]  time = 0.22, antiderivative size = 143, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 7, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.233, Rules used = {2528, 2486, 31, 2524, 2357, 2317, 2391} \[ -B g n \text {PolyLog}\left (2,-\frac {b x}{a}\right )+B g n \text {PolyLog}\left (2,-\frac {d x}{c}\right )+g \log (x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )+\frac {B f (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b}-\frac {B f n (b c-a d) \log (c+d x)}{b d}-B g n \log (x) \log \left (\frac {b x}{a}+1\right )+A f x+B g n \log (x) \log \left (\frac {d x}{c}+1\right ) \]

Antiderivative was successfully verified.

[In]

Int[(f + g/x)*(A + B*Log[e*((a + b*x)/(c + d*x))^n]),x]

[Out]

A*f*x - B*g*n*Log[x]*Log[1 + (b*x)/a] + (B*f*(a + b*x)*Log[e*((a + b*x)/(c + d*x))^n])/b + g*Log[x]*(A + B*Log
[e*((a + b*x)/(c + d*x))^n]) - (B*(b*c - a*d)*f*n*Log[c + d*x])/(b*d) + B*g*n*Log[x]*Log[1 + (d*x)/c] - B*g*n*
PolyLog[2, -((b*x)/a)] + B*g*n*PolyLog[2, -((d*x)/c)]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 2317

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(Log[1 + (e*x)/d]*(a +
b*Log[c*x^n])^p)/e, x] - Dist[(b*n*p)/e, Int[(Log[1 + (e*x)/d]*(a + b*Log[c*x^n])^(p - 1))/x, x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]

Rule 2357

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*x^
n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, n}, x] && RationalFunctionQ[RFx, x] && IGtQ[p, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2486

Int[Log[(e_.)*((f_.)*((a_.) + (b_.)*(x_))^(p_.)*((c_.) + (d_.)*(x_))^(q_.))^(r_.)]^(s_.), x_Symbol] :> Simp[((
a + b*x)*Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^s)/b, x] + Dist[(q*r*s*(b*c - a*d))/b, Int[Log[e*(f*(a + b*x)^p*
(c + d*x)^q)^r]^(s - 1)/(c + d*x), x], x] /; FreeQ[{a, b, c, d, e, f, p, q, r, s}, x] && NeQ[b*c - a*d, 0] &&
EqQ[p + q, 0] && IGtQ[s, 0]

Rule 2524

Int[((a_.) + Log[(c_.)*(RFx_)^(p_.)]*(b_.))^(n_.)/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[(Log[d + e*x]*(a + b
*Log[c*RFx^p])^n)/e, x] - Dist[(b*n*p)/e, Int[(Log[d + e*x]*(a + b*Log[c*RFx^p])^(n - 1)*D[RFx, x])/RFx, x], x
] /; FreeQ[{a, b, c, d, e, p}, x] && RationalFunctionQ[RFx, x] && IGtQ[n, 0]

Rule 2528

Int[((a_.) + Log[(c_.)*(RFx_)^(p_.)]*(b_.))^(n_.)*(RGx_), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*
RFx^p])^n, RGx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, p}, x] && RationalFunctionQ[RFx, x] && RationalF
unctionQ[RGx, x] && IGtQ[n, 0]

Rubi steps

\begin {align*} \int \left (f+\frac {g}{x}\right ) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx &=\int \left (f \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )+\frac {g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{x}\right ) \, dx\\ &=f \int \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx+g \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{x} \, dx\\ &=A f x+g \log (x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )+(B f) \int \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \, dx-(B g n) \int \frac {(c+d x) \left (-\frac {d (a+b x)}{(c+d x)^2}+\frac {b}{c+d x}\right ) \log (x)}{a+b x} \, dx\\ &=A f x+\frac {B f (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b}+g \log (x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )-\frac {(B (b c-a d) f n) \int \frac {1}{c+d x} \, dx}{b}-(B g n) \int \left (\frac {b \log (x)}{a+b x}-\frac {d \log (x)}{c+d x}\right ) \, dx\\ &=A f x+\frac {B f (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b}+g \log (x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )-\frac {B (b c-a d) f n \log (c+d x)}{b d}-(b B g n) \int \frac {\log (x)}{a+b x} \, dx+(B d g n) \int \frac {\log (x)}{c+d x} \, dx\\ &=A f x-B g n \log (x) \log \left (1+\frac {b x}{a}\right )+\frac {B f (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b}+g \log (x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )-\frac {B (b c-a d) f n \log (c+d x)}{b d}+B g n \log (x) \log \left (1+\frac {d x}{c}\right )+(B g n) \int \frac {\log \left (1+\frac {b x}{a}\right )}{x} \, dx-(B g n) \int \frac {\log \left (1+\frac {d x}{c}\right )}{x} \, dx\\ &=A f x-B g n \log (x) \log \left (1+\frac {b x}{a}\right )+\frac {B f (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b}+g \log (x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )-\frac {B (b c-a d) f n \log (c+d x)}{b d}+B g n \log (x) \log \left (1+\frac {d x}{c}\right )-B g n \text {Li}_2\left (-\frac {b x}{a}\right )+B g n \text {Li}_2\left (-\frac {d x}{c}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.10, size = 135, normalized size = 0.94 \[ g \log (x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )+\frac {B f (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b}-\frac {B f n (b c-a d) \log (c+d x)}{b d}-B g n \left (\log (x) \left (\log \left (\frac {b x}{a}+1\right )-\log \left (\frac {d x}{c}+1\right )\right )+\text {Li}_2\left (-\frac {b x}{a}\right )-\text {Li}_2\left (-\frac {d x}{c}\right )\right )+A f x \]

Antiderivative was successfully verified.

[In]

Integrate[(f + g/x)*(A + B*Log[e*((a + b*x)/(c + d*x))^n]),x]

[Out]

A*f*x + (B*f*(a + b*x)*Log[e*((a + b*x)/(c + d*x))^n])/b + g*Log[x]*(A + B*Log[e*((a + b*x)/(c + d*x))^n]) - (
B*(b*c - a*d)*f*n*Log[c + d*x])/(b*d) - B*g*n*(Log[x]*(Log[1 + (b*x)/a] - Log[1 + (d*x)/c]) + PolyLog[2, -((b*
x)/a)] - PolyLog[2, -((d*x)/c)])

________________________________________________________________________________________

fricas [F]  time = 0.45, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {A f x + A g + {\left (B f x + B g\right )} \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right )}{x}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f+g/x)*(A+B*log(e*((b*x+a)/(d*x+c))^n)),x, algorithm="fricas")

[Out]

integral((A*f*x + A*g + (B*f*x + B*g)*log(e*((b*x + a)/(d*x + c))^n))/x, x)

________________________________________________________________________________________

giac [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f+g/x)*(A+B*log(e*((b*x+a)/(d*x+c))^n)),x, algorithm="giac")

[Out]

Timed out

________________________________________________________________________________________

maple [F]  time = 0.08, size = 0, normalized size = 0.00 \[ \int \left (f +\frac {g}{x}\right ) \left (B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )+A \right )\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f+g/x)*(B*ln(e*((b*x+a)/(d*x+c))^n)+A),x)

[Out]

int((f+g/x)*(B*ln(e*((b*x+a)/(d*x+c))^n)+A),x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ B f n {\left (\frac {a \log \left (b x + a\right )}{b} - \frac {c \log \left (d x + c\right )}{d}\right )} + B f x \log \left (e {\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n}\right ) + A f x - B g \int -\frac {\log \left ({\left (b x + a\right )}^{n}\right ) - \log \left ({\left (d x + c\right )}^{n}\right ) + \log \relax (e)}{x}\,{d x} + A g \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f+g/x)*(A+B*log(e*((b*x+a)/(d*x+c))^n)),x, algorithm="maxima")

[Out]

B*f*n*(a*log(b*x + a)/b - c*log(d*x + c)/d) + B*f*x*log(e*(b*x/(d*x + c) + a/(d*x + c))^n) + A*f*x - B*g*integ
rate(-(log((b*x + a)^n) - log((d*x + c)^n) + log(e))/x, x) + A*g*log(x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \left (f+\frac {g}{x}\right )\,\left (A+B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\right ) \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f + g/x)*(A + B*log(e*((a + b*x)/(c + d*x))^n)),x)

[Out]

int((f + g/x)*(A + B*log(e*((a + b*x)/(c + d*x))^n)), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (A + B \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}\right ) \left (f x + g\right )}{x}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f+g/x)*(A+B*ln(e*((b*x+a)/(d*x+c))**n)),x)

[Out]

Integral((A + B*log(e*(a/(c + d*x) + b*x/(c + d*x))**n))*(f*x + g)/x, x)

________________________________________________________________________________________